Optimal. Leaf size=248 \[ -\frac{3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+7}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}-\frac{\sec ^3(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac{p+4}{2},\frac{p+7}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac{5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}+\frac{4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}+\frac{(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.421813, antiderivative size = 248, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2711, 2607, 270, 16, 2617, 14} \[ -\frac{3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+7}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}-\frac{\sec ^3(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac{p+4}{2},\frac{p+7}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac{5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}+\frac{4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}+\frac{(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2711
Rule 2607
Rule 270
Rule 16
Rule 2617
Rule 14
Rubi steps
\begin{align*} \int \frac{(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx &=\frac{\int \left (a^3 \sec ^6(e+f x) (g \tan (e+f x))^p-3 a^3 \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p+3 a^3 \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p-a^3 \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx}{a^6}\\ &=\frac{\int \sec ^6(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac{\int \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac{3 \int \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p \, dx}{a^3}+\frac{3 \int \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p \, dx}{a^3}\\ &=\frac{\operatorname{Subst}\left (\int (g x)^p \left (1+x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{a^3 f}-\frac{\int \sec ^3(e+f x) (g \tan (e+f x))^{3+p} \, dx}{a^3 g^3}+\frac{3 \int \sec ^4(e+f x) (g \tan (e+f x))^{2+p} \, dx}{a^3 g^2}-\frac{3 \int \sec ^5(e+f x) (g \tan (e+f x))^{1+p} \, dx}{a^3 g}\\ &=-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{\operatorname{Subst}\left (\int \left ((g x)^p+\frac{2 (g x)^{2+p}}{g^2}+\frac{(g x)^{4+p}}{g^4}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac{3 \operatorname{Subst}\left (\int (g x)^{2+p} \left (1+x^2\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac{(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac{2 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{(g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}+\frac{3 \operatorname{Subst}\left (\int \left ((g x)^{2+p}+\frac{(g x)^{4+p}}{g^2}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac{(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac{5 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{4 (g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}\\ \end{align*}
Mathematica [B] time = 31.2325, size = 1276, normalized size = 5.15 \[ \text{result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.451, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( g\tan \left ( fx+e \right ) \right ) ^{p}}{ \left ( a+a\sin \left ( fx+e \right ) \right ) ^{3}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\left (g \tan \left (f x + e\right )\right )^{p}}{3 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} +{\left (a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3}\right )} \sin \left (f x + e\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]